1. Field of the Invention
The present invention relates generally to an improved data processing system, in particular, to a method, system, and computer program product for optimizing performance in a data processing system. Still more particularly, the present invention provides a method, system, and computer program product for propagation of filter expressions across multi-layered systems.
2. Description of the Related Art
Message (event) brokers are common middleware for large computer installations. Middleware is software that mediates between an application program and a network, managing the interaction between disparate applications across the heterogeneous computing systems or platforms. These systems or platforms may be arranged in multiple layers, with an underlying system and multiple systems overlaying one another.
Message brokers implement asynchronous notification delivery in several formats. Asynchronous notification requires that a client application register itself with a message broker and request that the message broker notify the client application whenever the message broker receives information from a system that matches the selection criteria, or filter expression, specified by the client application.
Application Program Interfaces (APIs) are used in order to achieve a certain degree of interoperability between applications and message brokers, and between differing message brokers. These APIs include such standards as Java™ Message Service (JMS), Web Service Notification (WS-Notification), Structured Query Language (SQL), and Java™ Data Base Connectivity (JDBC). APIs and message brokers both serve as data processing engines.
Because JMS is part of the Java™ 2 platform Enterprise Edition (J2EE) specification, there are already several message brokers that support this API. WS-Notification is a more generic API that is also being adopted in mainstream J2EE application servers because WS-Notification allows applications to interoperate with message brokers that are not based in the J2EE technology.
This invention solves a problem that arises when overlaying a message broker with an API that has selection criteria that is partially or completely incompatible with the message broker. For example of partial incompatibility, overlaying a JMS implemented API with a WS-Notification message broker creates a problem due to selection criteria that is partially incompatible. For an example of complete incompatibility, the filtering of binary data in a relational database management system is inefficient because no filtering is performed in the underlying data processing engine.
Overlaying an implementation of an API with a partially incompatible notification message broker is relatively inexpensive when compared to writing a notification message broker from scratch. However, a problem may arise from differences between the selection criteria for an API and the selection criteria for a notification message broker. For example, WS-Notification message broker uses an XPath notation, and the selection criteria in the XPath notation differs from the selection criteria used in a JMS implemented API. Sometimes these differences between the selection criteria for an API and the selection criteria for a notification message broker may be too difficult to work around. For example, the XPath users may apply a “ceiling” operation on float values before a comparison, but there is no counterpart in the JMS implemented API selection criteria language. In another example, any type of hierarchical or positional filter may be difficult to implement in a relational model, such as a relational database management system.
Due to such difficulties, some implementations of notification message brokers overlaid on certain APIs will choose not to propagate selection criteria to the underlying message broker. For example, implementations of WS-Notification message brokers overlaid on JMS implemented APIs will choose not to propagate JMS selection criteria to the underlying message broker. Because of the lack of applied selection criteria, the WS-Notification message broker accepts and converts all possible incoming messages from the underlying message broker to its XML representation and then applies the selection criteria in the XPath expression to all of the converted XML messages. This is generally more expensive than attempting to filter the incoming messages at the underlying message broker, which would prevent much unnecessary transmission between the two brokers and the conversion of unneeded data to XML representation.
Incompatibilities between some notification message brokers and with certain APIs create problems that include data types, repeating elements, expressions against element names, and node level operations. For example, JMS supports only the following data types: Boolean, byte, short, int, long, float, double, and string. Additionally, because relational databases do not have the concept of arrays, some vendors have added non-standard array support. Therefore, a notification message broker that uses selection criteria with data types outside JMS′ limited range cannot use these additional data types for anything other than string comparing functions. For example, XPath uses datetime, which is not supported by JMS.
Because some APIs only filter message headers, all data for filtering is simply stored as properties. Therefore, the name of each property must be unique because it is not possible to have a repeating element represented in the message header. One example of an API that only filters message headers is JMS.
Because some APIs do not support any expressions against the attribute name, no wildcards or similar expressions can be used. For example, “/MyData[*=‘avalue’]” cannot be used for some APIs because the wildcard ‘*’ expression is not supported.
Node level operations, such as trying to pick the third occurrence of an element, cannot be done in some APIs. For example, “/MyData[last( ) and A=32]” cannot be done in some APIs because of the attempt to select the last occurrence of an element.
Therefore, it would be advantageous to have a method, system, and computer program product for propagation of filter expressions across multi-layered systems.